package com.ruoyi.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.entity.SysDictTree;
import com.ruoyi.common.core.service.SysDictTreeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 知识点分类
 */
@RestController
@RequestMapping("/dict/tree")
public class SysDictTreeController extends BaseController {
    @Autowired
    private SysDictTreeServiceImpl service;

    @RequestMapping(value = "/doSave")
    public Object doSave(SysDictTree vo) {
        service.doSave(vo);
        return success();
    }

    @RequestMapping(value = "/doDelete")
    public Object doDelete(Long id) {
        service.doDelete(id);
        return success();
    }

    @RequestMapping(value = "/getById")
    public Object getById(Long id) {
        return service.getById(id);
    }
}
